import request from '@/utils/request'

// 查询用户收益列表
export function listDonations(query) {
  return request({
    url: '/system/donations/list',
    method: 'get',
    params: query
  })
}

// 查询用户收益详细
export function getDonations(revenueId) {
  return request({
    url: '/system/donations/' + revenueId,
    method: 'get'
  })
}

// 新增用户收益
export function addDonations(data) {
  return request({
    url: '/system/donations',
    method: 'post',
    data: data
  })
}

// 修改用户收益
export function updateDonations(data) {
  return request({
    url: '/system/donations',
    method: 'put',
    data: data
  })
}

// 删除用户收益
export function delDonations(revenueId) {
  return request({
    url: '/system/donations/' + revenueId,
    method: 'delete'
  })
}
